//
//  DSYMVModel.m
//  BLDMusic
//
//  Created by dllo on 16/3/17.
//  Copyright © 2016年 白云杰. All rights reserved.
//

#import "DSYMVModel.h"

@implementation DSYMVModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([@"id" isEqualToString:key]) {
        self.mvId = value;
    }
}

- (id)valueForUndefinedKey:(NSString *)key
{
    return nil;
}


- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.vertical forKey:@"vertical"];
    [aCoder encodeObject:self.typedescription forKey:@"typedescription"];
    [aCoder encodeObject:self.picUrl forKey:@"picUrl"];
    [aCoder encodeObject:self.songId forKey:@"songId"];
    [aCoder encodeObject:self.type forKey:@"type"];
    [aCoder encodeObject:self.suffix forKey:@"suffix"];
    [aCoder encodeObject:self.url forKey:@"url"];
    [aCoder encodeObject:self.size forKey:@"size"];
    [aCoder encodeObject:self.mvId forKey:@"mvId"];
    [aCoder encodeObject:self.duration forKey:@"duration"];
    [aCoder encodeObject:self.durationMilliSecond forKey:@"durationMilliSecond"];
    [aCoder encodeObject:self.videoId forKey:@"videoId"];
    [aCoder encodeObject:self.path forKey:@"path"];
    [aCoder encodeObject:self.horizontal forKey:@"horizontal"];
    [aCoder encodeObject:self.bitRate forKey:@"bitRate"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.vertical = [aDecoder decodeObjectForKey:@"vertical"];
        self.typedescription = [aDecoder decodeObjectForKey:@"typedescription"];
        self.picUrl = [aDecoder decodeObjectForKey:@"picUrl"];
        self.songId = [aDecoder decodeObjectForKey:@"songId"];
        self.type = [aDecoder decodeObjectForKey:@"type"];
        self.suffix = [aDecoder decodeObjectForKey:@"suffix"];
        self.url = [aDecoder decodeObjectForKey:@"url"];
        self.size = [aDecoder decodeObjectForKey:@"size"];
        self.mvId = [aDecoder decodeObjectForKey:@"mvId"];
        self.duration = [aDecoder decodeObjectForKey:@"duration"];
        self.durationMilliSecond = [aDecoder decodeObjectForKey:@"durationMilliSecond"];
        self.videoId = [aDecoder decodeObjectForKey:@"videoId"];
        self.path = [aDecoder decodeObjectForKey:@"path"];
        self.horizontal = [aDecoder decodeObjectForKey:@"horizontal"];
        self.bitRate = [aDecoder decodeObjectForKey:@"bitRate"];
    }
    return self;
}

@end
